package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * ClassName: MyExceptionHandler
 * Description:
 *   全局的异常处理器
 * @Author 刘艳丽
 * @Create 2024/9/22 21:39
 * @Version 1.0
 */
//@ControllerAdvice
//public class MyExceptionHandler {
//    @ExceptionHandler(Exception.class)
//    @ResponseBody
//    public Result exception1(Exception e){
//        e.printStackTrace();
//        return Result.fail(500, e.getMessage());
//    }
//}
